--- crypto/heimdal/kadmin/version4.c	Thu Oct  9 14:44:32 2003
+++ crypto/heimdal/kadmin/version4.c	Thu Apr 29 07:29:23 2004
@@ -965,6 +965,8 @@
 	if(term_flag)
 	    exit(0);
 	if(first) {
+	    if (len < 2)
+		krb5_errx(context, 1, "received too short len (%d < 2)", len);
 	    /* first time around, we have already read len, and two
                bytes of the version string */
 	    krb5_data_alloc(&message, len);
